package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.wemedia.pojos.WmNewsMaterial;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface WmNewsMaterialMapper extends BaseMapper<WmNewsMaterial> {
    /**
     * 添加文章与素材的对应关系数据
     * @param materialIds
     * @param newsId
     * @param type
     */
    void saveRelations(
            @Param("materialIds") List<Integer> materialIds,
            @Param("newsId") Integer newsId,
            @Param("type") short type
    );
}
